<div class="bg-light lter b-b wrapper-md">
    <h4 class="m-n font-thin">消费排行</h4>
</div>
<div class="wrapper" ng-controller="consumerTopCtrl">
    <div class="panel panel-default panel-body">
        <div class="clearfix m-b-sm">
            <div class="inline pull-left m-r-sm" ng-controller="DatepickerDemoCtrl">
                <div class="input-group w-lg">
                    <input type="text" class="form-control" placeholder="请输入开始日期" uib-datepicker-popup="yyyy-MM-dd" datepicker-popup="yyyy-MM-dd" ng-model="consumerTop.startTime"
                           alt-input-formats="altInputFormats" is-open="opened" datepicker-options="dateOptions" close-text="关闭" clear-text="清空" current-text="今天" initialDate disabled/>
                    <span class="input-group-btn ">
                        <button type="button" class="btn btn-default " ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                </div>
            </div>
            <div class="inline pull-left m-r-sm" ng-controller="DatepickerDemoCtrl">
                <div class="input-group w-lg ">
                    <input type="text" class="form-control" placeholder="请输入结束日期" uib-datepicker-popup="yyyy-MM-dd" datepicker-popup="yyyy-MM-dd" ng-model="consumerTop.endTime"
                           alt-input-formats="altInputFormats" is-open="opened" datepicker-options="dateOptions" close-text="关闭" clear-text="清空" current-text="今天" min-date="consumerTop.startTime" initialDate disabled/>
                    <span class="input-group-btn ">
                        <button type="button" class="btn btn-default " ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                </div>
            </div>
            <div class="col-sm-1 pull-left">
                <button class="btn btn-md btn-default" ng-click="query()">查询</button>
            </div>
            <div class="col-sm-1 pull-right no-padder">
                <div class="text-right">
                    <button class="btn btn-success m-n" ng-click="openExportDate()">导出报表</button>
                </div>
            </div>
        </div>
        <div class="fa-border">
            <table class="table m-b-none table-striped table-responsive">
                <thead>
                <tr>
                    <th>消费排名</th>
                    <th>用户信息</th>
                    <th>消费金额</th>
                    <th width="100">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in list">
                    <td>{{$index+1}}</td>
                    <td>昵称：{{item.userName}}<br>
                        联系方式：{{item.userMobile}}</td>
                    <td>{{item.totalMoney}}</td>
                    <td>
                        <a class="btn btn-sm btn-success" ui-sref="app.userExpense({id:item.userId})" target="_blank">查看消费历史</a>
                    </td>
                </tr>
                </tbody>
            </table>
            <div ng-if="list.length<=0 && !app.loading" class="padder-v text-center">
                <span class="h6">~未搜索到任何数据~</span>
            </div>
            <div>
                <circle-loading ng-if="app.loading"></circle-loading>
            </div>
        </div>
        <footer class="panel-footer">
            <div class="row">
                <div class="col-sm-4 hidden-xs">
                </div>
                <div class="col-sm-4 text-center">
                    <small class="text-muted inline m-t-sm m-b-sm">显示第 {{startRow}} 至 {{endRow}} 项结果，共 {{totalItems}} 项</small>
                </div>
                <div class="col-sm-4 text-right text-center-xs">
                    <pagination boundary-links="true" total-items="totalItems" ng-model="currentPage"
                                ng-change="pageChanged()" max-size="{{maxPageRow}}" class="pagination-sm m-t-none m-b"
                                previous-text="上一页" next-text="下一页"
                                first-text="首页" last-text="尾页"></pagination>
                </div>
            </div>
        </footer>
    </div>
</div>